int main()
{
;
}


/*
....................................................... TCP C SERVER ....................................................................................

#include<netinet/in.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
    int i, receiver ,listensock , size;
    char recvBuffer[100] , sendbuffer[100];
    
    struct sockaddr_in thisSocket , clientSock ;
    
    listensock = socket(PF_INET , SOCK_STREAM , 0);
    
    thisSocket.sin_family = AF_INET;
    thisSocket.sin_addr.s_addr = inet_addr("127.0.0.1");
    thisSocket.sin_port = htons(7778);
    
    bind(listensock , (struct sockaddr *)&thisSocket , sizeof(thisSocket));
    listen(listensock , 1);
    size = sizeof(struct sockaddr_in);
    receiver = accept(listensock , (struct sockaddr *)&clientSock , &size);

    while(1)
        {
            //////////// RECV PART ////////////
	    i = recv(receiver,recvBuffer,100,0);
            if(i > 0)
                {
                    recvBuffer[i] = '\0';
                    printf("%s",recvBuffer);
                }
            //////////// SEND PART ////////////
	    fgets(sendbuffer,100,stdin);
	    send(receiver , sendbuffer , strlen(sendbuffer),0);
        }
}

....................................................... TCP C CLIENT ....................................................................................

#include<netinet/in.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
    int i, receiver;
    char recvBuffer[100] , sendbuffer[100];
    
    struct sockaddr_in thisSocket;
    
    receiver = socket(PF_INET , SOCK_STREAM , 0);
    
    thisSocket.sin_family = AF_INET;
    thisSocket.sin_addr.s_addr = inet_addr("127.0.0.1");    
    thisSocket.sin_port = htons(7778);

    connect(receiver,(struct sockaddr *)&thisSocket,sizeof(thisSocket));

    while(1)
        {
            //////////// SEND PART ////////////
	    fgets(sendbuffer,100,stdin);
            send(receiver,sendbuffer,strlen(sendbuffer),0);
            //////////// RECV PART ////////////
	    i =recv(receiver,recvBuffer,100,0);
	    if(i>0)
                {
                    recvBuffer[i]='\0';
                    printf("%s",recvBuffer);
                }
        }
}

........................................................ TCP JAVA SERVER ...................................................................................

import java.io.*;
import java.net.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        ServerSocket ss = null;
        Socket s = null;

        ss = new ServerSocket(7777);
        s = ss.accept();

        DataOutputStream dos = new DataOutputStream(s.getOutputStream());
        DataInputStream dis = new DataInputStream(s.getInputStream());

        while(true)
        {
            String from_Client = dis.readUTF();
            System.out.println(from_Client);

            Scanner sc = new Scanner(System.in);
            String to_client = sc.nextLine();
            dos.writeUTF(to_client);
        }


    }
}

........................................................ TCP JAVA CLIENT ...................................................................................

import java.io.*;
import java.net.*;
import java.util.*;

public class Main {

    public static void main(String[] args) throws IOException {
        Socket s = null;
        s = new Socket("127.0.0.1",7777);
        DataOutputStream dos = new DataOutputStream(s.getOutputStream());
        DataInputStream dis = new DataInputStream(s.getInputStream());
        while (true)
        {
            Scanner sc = new Scanner(System.in);
            String to_server = sc.nextLine();
            dos.writeUTF(to_server);
            String from_server = dis.readUTF();
            System.out.println(from_server);
        }

    }
}

........................................................ UDP JAVA SERVER ...................................................................................

import java.io.*;
import java.net.*;
import java.util.Scanner;

public class Main
{
    public static void main(String args[])throws IOException {


        DatagramSocket ds = new DatagramSocket(6058);
        byte receiver[] = new byte[1024];
        byte sender[] = new byte[1024];


        DatagramPacket RECVdp = new DatagramPacket(receiver, receiver.length);
        ds.receive(RECVdp);

        String sentence = new String(RECVdp.getData());
        System.out.println(sentence);

        InetAddress ip = RECVdp.getAddress();
        int port = RECVdp.getPort();

        Scanner sc = new Scanner(System.in);
        String reply = sc.nextLine();
        sender = reply.getBytes();

        DatagramPacket SENDdp = new DatagramPacket(sender, sender.length, ip, port);

        ds.send(SENDdp);
        ds.close();
    }
}


........................................................ UDP JAVA CLIENT ...................................................................................

import java.io.*;
import java.net.*;
import java.util.*;

public class Main {

    public static void main(String[] args)throws IOException {
        byte receiver[] = new byte[1024];
        byte sender[] = new byte[1024];

        DatagramSocket ds = new DatagramSocket();
        InetAddress ip = InetAddress.getByName("localhost");

        Scanner sc = new Scanner(System.in);
        String reply = sc.nextLine();
        sender = reply.getBytes();

        DatagramPacket SENDdp = new DatagramPacket(sender,sender.length,ip,6058);
        ds.send(SENDdp);

        DatagramPacket RECVdp = new DatagramPacket(receiver,receiver.length);
        ds.receive(RECVdp);
        String from_server = new String(RECVdp.getData());
        System.out.println(from_server);

        ds.close();

    }
}



........................................................ FILE IN C ...................................................................................

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int main()
{
  FILE *FP;
  int i=0;
  FP = fopen("test.txt","r");
  char str[1024];
  char c;
  while(!feof(FP))
  {
    str[i]=fgetc(FP);;
    i++;
  }
  str[i-1]='\0';
  puts(str);
}


........................................................ FILE IN JAVA ...................................................................................

import java.io.*;

public class Main {
    public static void main(String args[]) throws IOException
    {
        int i=0;
        FileInputStream in = null;
        char str[] = new char[1000];

	in = new FileInputStream("test.txt");

	int c;
	while ((c = in.read()) != -1) {
	    str[i++]=(char)c;
	}
	System.out.println(str);

        }
    }
    
*/